package bairui.international.model.type;

/**
 *
 * (产品属性类型)Type_ProductProperty
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("产品属性类型")
@com.lianjing.sh.processing.info.annotation.InfoComment("产品属性类型")
public enum Type_ProductProperty implements com.sh_lianjing.standard.EnumCommentable<Type_ProductProperty> {

	/**
	 * (固定)Fix</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("固定")
	@com.lianjing.sh.processing.info.annotation.InfoComment("固定")
	Fix("固定")
,
	/**
	 * (价格范围)Rang</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("价格范围")
	@com.lianjing.sh.processing.info.annotation.InfoComment("价格范围")
	Rang("价格范围")
;

	private static java.util.Map<String, Type_ProductProperty> Cache = new java.util.HashMap<>();
	static{
		for(Type_ProductProperty enumItem : Type_ProductProperty.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_ProductProperty(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_ProductProperty parseByComment(String comment) {
		return Type_ProductProperty.parse(comment);
	}

	public static Type_ProductProperty parse(String comment) {
		Type_ProductProperty enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_ProductProperty.class, comment);
		}
		return enumItem;
	}

}
